<?php
/**
 *
 * @user: leo
 * @date: 2021/6/22
 * @createTime: 13:38
 * @company: 迈酷网络科技 http://www.maicooit.com
 */
namespace app\admin\logic\user;

use app\BaseController;
use app\admin\model\Menu as MenuModel;

class Menu extends  BaseController {
    //菜单列表
    public static function MenuListLogic($key,$domain,$page,$pagesize){
        $menu = new MenuModel();
        $list = $menu->MenuListModel($key,$domain,$page,$pagesize);
        return $list;
    }
    //菜单新增
    public static function MenuAddLogic($info){
        $menu = new MenuModel();
        $res = $menu->MenuInsertModel($info);
        return $res;
    }
    //菜单编辑
    public static function MenuSaveLogic($userid,$info){
         $menu = new MenuModel();
         $res = $menu->MenuSaveModel($userid,$info);
         return $res;
    }
    //菜单禁用
    public static function MenuDisableEableLogic(){
    }
    //菜单删除
    public static function MenuDelLogic($id){
        $menu = new MenuModel();
        $res = $menu->MenudelModel($id);
        return $res;
    }
    //获取域下的所有菜单
    public static  function MenuAllLogic($domain=""){
        $role = new MenuModel();
        $list = $role->MenuGetAllModel($domain);
        return $list;
    }
}